import time
import 通信平台性能测试


def log_decorator(func):
    def wrapper(*args, **kwargs):
        print('日志记录开始')
        start = time.time()
        f = func(*args, **kwargs)
        time.sleep(1)
        time_consuming = time.time() - start
        print(f'共耗时{round(time_consuming, 5)}秒')
        print('日志记录结束')
        return f
    return wrapper


l1 = [i for i in range(100000)]


@log_decorator
def sum_numbers(numbers):
    return sum(numbers)
